package top.kaoshanji.p1ch05a;

/**
 * 代码清单-p1ch05a-084页a：演示while循环
 * author kaoshanji
 * ^_^
 * create time 2025/3/6 21:22
 */
public class WhileTest {

    public static void main(String[] args) {
        while (condition()) {
            System.out.println("Inside 'while'");
        }
        System.out.println("Exited 'while'");
    }

    static boolean condition() {
        boolean result = Math.random() < 0.99;
        System.out.println(result + ", ");
        return result;
    }



}
